#include<iostream>
using namespace std;

int main()
{
	double x = 0.0;
	int n = 0;
	double sum = 1.0;
	double r = 1.0;
	cin >> x >> n;
	while(n--)
	{
		r *= x;
		sum += r;
	}
	printf("%.2f",sum);
	return 0;
}
